package com.cskaoyan.javase.oop1._8review._0lol;

/**
 * 完成以下案例，思考一下怎么能够找到系统中类、对象究竟是哪些？
 *
 * 1. 用面向对象的思想模拟LOL当中盖伦的战斗
 *      对象：盖伦这个英雄
 *      类：英雄类
 *      类是抽取对象的共性：
 *          属性：名字，血量，技能等
 *          行为：移动，攻击，嘲讽，放技能等。
 *
 *
 *
 * @since 10:45
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        Legend legend = new Legend("德玛西亚之力—盖伦", 600, 0, "沉默", "勇气", "大风车", "大宝剑");
        legend.fight();
    }
}

// 定义英雄类
class Legend {

    // 属性
    String name;
    int hp;
    int mp;
    String skillQ;
    String skillW;
    String skillE;
    String skillR;

    // 行为
    public void move() {
        System.out.println("正在移动！");
    }

    public void fight() {
        System.out.println("名字为：" + name + "的英雄，正在守塔！");
    }

    // 构造器

    public Legend() {
    }

    public Legend(String name, String skillQ, String skillW, String skillE, String skillR) {
        this.name = name;
        this.skillQ = skillQ;
        this.skillW = skillW;
        this.skillE = skillE;
        this.skillR = skillR;
    }

    public Legend(String name, int hp, int mp, String skillQ, String skillW, String skillE, String skillR) {
        this(name, skillQ, skillW, skillE, skillR);
        this.hp = hp;
        this.mp = mp;
    }
}
